@use 'sass:color';

// 全局样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: $background-color-base;
  color: $text-primary;
  font-size: $font-size-md;
  line-height: 1.5;
}

// 移动端适配
@media screen and (max-width: $mobile-width) {
  html {
    font-size: 14px;
  }
}

// 通用工具类
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-center { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}
.flex-between { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
}
.flex-column { 
  display: flex; 
  flex-direction: column; 
}

.w-full { width: 100%; }
.h-full { height: 100%; }

.m-0 { margin: 0; }
.m-1 { margin: $spacing-xs; }
.m-2 { margin: $spacing-sm; }
.m-3 { margin: $spacing-md; }
.m-4 { margin: $spacing-lg; }

.p-0 { padding: 0; }
.p-1 { padding: $spacing-xs; }
.p-2 { padding: $spacing-sm; }
.p-3 { padding: $spacing-md; }
.p-4 { padding: $spacing-lg; }

// 音乐节主题样式
.festival-gradient {
  background: linear-gradient(135deg, $festival-primary 0%, $festival-secondary 100%);
}

.festival-card {
  background: white;
  border-radius: $border-radius-lg;
  box-shadow: $box-shadow-light;
  padding: $spacing-lg;
  margin-bottom: $spacing-md;
  transition: all $transition-normal ease;
  
  &:hover {
    box-shadow: $box-shadow-medium;
    transform: translateY(-2px);
  }
}

.festival-button {
  background: linear-gradient(135deg, $festival-primary 0%, $festival-secondary 100%);
  border: none;
  color: white;
  border-radius: $border-radius-md;
  padding: $spacing-sm $spacing-lg;
  font-weight: $font-weight-medium;
  cursor: pointer;
  transition: all $transition-normal ease;
  
  &:hover {
    transform: translateY(-1px);
    box-shadow: $box-shadow-medium;
  }
  
  &:active {
    transform: translateY(0);
  }
}

// 动画类
.fade-enter-active,
.fade-leave-active {
  transition: opacity $transition-normal ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active,
.slide-up-leave-active {
  transition: all $transition-normal ease;
}

.slide-up-enter-from {
  transform: translateY(20px);
  opacity: 0;
}

.slide-up-leave-to {
  transform: translateY(-20px);
  opacity: 0;
}

// 移动端优化
@media screen and (max-width: $mobile-width) {
  .festival-card {
    padding: $spacing-md;
    margin-bottom: $spacing-sm;
  }
  
  .festival-button {
    padding: $spacing-sm $spacing-md;
    font-size: $font-size-sm;
  }
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: $background-color-light;
  border-radius: $border-radius-sm;
}

::-webkit-scrollbar-thumb {
  background: $border-color-base;
  border-radius: $border-radius-sm;
  transition: background-color $transition-fast ease;
}

::-webkit-scrollbar-thumb:hover {
  background: $text-secondary;
}

// Element Plus 组件样式覆盖
.el-button--primary {
  background: linear-gradient(135deg, $festival-primary 0%, $festival-secondary 100%);
  border: none;
  
  &:hover {
    background: linear-gradient(135deg, color.adjust($festival-primary, $lightness: -10%) 0%, color.adjust($festival-secondary, $lightness: -10%) 100%);
  }
}

.el-card {
  border-radius: $border-radius-lg;
  box-shadow: $box-shadow-light;
  border: none;
  
  .el-card__header {
    border-bottom: 1px solid $border-color-lighter;
    padding: $spacing-lg;
  }
  
  .el-card__body {
    padding: $spacing-lg;
  }
}

.el-input {
  .el-input__wrapper {
    border-radius: $border-radius-md;
  }
}

.el-tabs {
  .el-tabs__item {
    font-weight: $font-weight-medium;
  }
  
  .el-tabs__item.is-active {
    color: $festival-primary;
  }
  
  .el-tabs__active-bar {
    background-color: $festival-primary;
  }
} 